
import {simpleServer} from '@/tools/servers'

/**
 * 物流单
 */
export class LogisticsService {
    // 分页查询列表
    static findLogisticss (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findLogisticss,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/findLogisticss', body);
    }


    //根据物流单Id查询物流单
    static findLogistics (logisticsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findLogistics ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/findLogistics',body);
    }

    //为了编辑,根据物流单Id查询物流单
    static findLogisticsForEdit(logisticsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findLogisticsForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/findLogisticsForEdit',body);
    }

    //为了查看,根据物流单Id查询物流单，所有外键字段的名称都已加载
    static findLogisticsForView(logisticsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findLogisticsForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/findLogisticsForView',body);
    }

    //创建新的物流单
    static createLogistics() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createLogistics,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/createLogistics',body);
    }

    //保存物流单
    static saveLogistics(logistics) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveLogistics,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/saveLogistics', body);
    }

    //编辑物流单
    static updateLogistics (logistics) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateLogistics,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/updateLogistics', body);
    }

    //根据物流单Id删除物流单
    static deleteLogistics (logisticsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteLogistics,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/deleteLogistics',body);
    }

    //为了查看,根据物流单Id查询物流单，只加载ID 和 名称
    static findLogisticssWithIdNameById(logisticsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findLogisticssWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/findLogisticssWithIdNameById',body);
    }

    //为了查看,根据物流单 名称 查询物流单，只加载ID 和 名称
    static findLogisticssWithIdNameByName(logisticsName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findLogisticssWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Logistics/findLogisticssWithIdNameByName',body);
    }


}
